package com.itheima.search.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <dl>
 * <dd>描述: ~节点业务逻辑实现</dd>
 * <dd>创建时间：  10:20 2020/6/23</dd>
 * <dd>创建人： zz</dd>
 * <dt>版本历史: </dt>
 * <pre>
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2020/6/23      guodong       1.0        1.0 Version
 * </pre>
 * </dl>
 */
@Data
@Document(indexName = "question", type = "question")
@ApiModel
public class Question {

    @ApiModelProperty(value = "问题id")
    @Id
    private Long id;
    @ApiModelProperty(value = "问题")
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;
    @ApiModelProperty(value = "答案")
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String answer;

}
